<template name="livechatIntegrationWebhook">
	{{#requiresPermission 'view-livechat-webhooks'}}
		<div class="rocket-form">
			<h2>{{_ "Webhooks"}}</h2>
			<p>
				{{_ "You_can_use_webhooks_to_easily_integrate_livechat_with_your_CRM"}}
				<a href="https://rocket.chat/docs/administrator-guides/livechat/#integrations">{{_ "Click_here"}}</a> {{_ "to_see_more_details_on_how_to_integrate"}}
			</p>

			<form id="integration-form">
				<div class="input-line">
					<div class="rc-input">
						<label class="rc-input__label">
							<div class="rc-input__title">{{_ "Webhook_URL"}}</div>
							<div class="rc-input__wrapper">
								<input type="url" name="webhookUrl" id="webhookUrl" value="{{webhookUrl}}" placeholder="https://yourdomain.com/webhook/entrypoint" class="rc-input__element">
							</div>
						</label>
					</div>
				</div>
				<div class="input-line">
					<div class="rc-input">
						<label class="rc-input__label">
							<div class="rc-input__title">{{_ "Secret_token"}}</div>
							<div class="rc-input__wrapper">
								<input type="text" name="secretToken" id="secretToken" value="{{secretToken}}"
								 class="rc-input__element">
							</div>
						</label>
					</div>
				</div>
				<div class="input-line">
					<label for="sendOnStart">
						<input type="checkbox" name="sendOnStart" id="sendOnStart" value="1" checked="{{sendOnStartChecked}}">
						{{_ "Send_request_on_chat_start"}}
					</label>
				</div>
				<div class="input-line">
					<label for="sendOnClose">
						<input type="checkbox" name="sendOnClose" id="sendOnClose" value="1" checked="{{sendOnCloseChecked}}">
						{{_ "Send_request_on_chat_close"}}
					</label>
				</div>
				<div class="input-line">
					<label for="sendOnChatTaken">
						<input type="checkbox" name="sendOnChatTaken" id="sendOnChatTaken" value="1" checked="{{sendOnChatTakenChecked}}">
						{{_ "Send_request_on_chat_taken"}}
					</label>
				</div>
				<div class="input-line">
					<label for="sendOnChatQueued">
						<input type="checkbox" name="sendOnChatQueued" id="sendOnChatQueued" value="1" checked="{{sendOnChatQueuedChecked}}">
						{{_ "Send_request_on_chat_queued"}}
					</label>
				</div>
				<div class="input-line">
					<label for="sendOnForward">
						<input type="checkbox" name="sendOnForward" id="sendOnForward" value="1" checked="{{sendOnForwardChecked}}">
						{{_ "Send_request_on_forwarding"}}
					</label>
				</div>
				<div class="input-line">
					<label for="sendOnOffline">
						<input type="checkbox" name="sendOnOffline" id="sendOnOffline" value="1" checked="{{sendOnOfflineChecked}}">
						{{_ "Send_request_on_offline_messages"}}
					</label>
				</div>
				<div class="input-line">
					<label for="sendOnVisitorMessage">
						<input type="checkbox" name="sendOnVisitorMessage" id="sendOnVisitorMessage" value="1" checked="{{sendOnVisitorMessageChecked}}">
						{{_ "Send_request_on_visitor_message"}}
					</label>
				</div>
				<div class="input-line">
					<label for="sendOnAgentMessage">
						<input type="checkbox" name="sendOnAgentMessage" id="sendOnAgentMessage" value="1" checked="{{sendOnAgentMessageChecked}}">
						{{_ "Send_request_on_agent_message"}}
					</label>
				</div>
				<div class="rc-button__group submit">
					<button class="rc-button rc-button--danger reset-settings" type="button"><i class="icon-ccw"></i>{{_ "Reset"}}</button>
					<button class="rc-button rc-button--secondary test" type="button" disabled="{{disableTest}}">{{_ "Send_Test"}}</button>
					<button class="rc-button rc-button--primary save"><i class="icon-floppy"></i>{{_ "Save"}}</button>
				</div>
			</form>
		</div>
	{{/requiresPermission}}
</template>
